package com.dragee.modules.work.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dragee.config.resolver.LongJsonDeserializer;
import com.dragee.config.resolver.LongJsonSerializer;
import com.dragee.utils.excel.FieldDispose;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 培训
 * 
 * @author tc
 * @email tc@mail.com
 * @date 2023-05-21 20:39:23
 */
@Data
@TableName("t_train")
public class TrainEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId
    @JsonSerialize(using = LongJsonSerializer.class)
    @JsonDeserialize(using = LongJsonDeserializer.class)
    @ExcelIgnore
    private Long id;
    /**
     * 培训名称
     */
    @ExcelProperty(value = "培训名称")
    @FieldDispose(value = "name")
        private String name;
    /**
     * 培训类型
     */
    @ExcelProperty(value = "培训类型")
    @FieldDispose(value = "type")
        private String type;
    /**
     * 比赛组别
     */
    @ExcelProperty(value = "比赛组别")
    @FieldDispose(value = "groups")
        private String groups;
    /**
     * 省code
     */
    @ExcelProperty(value = "省code")
    @FieldDispose(value = "provinceCode")
        private String provinceCode;
    /**
     * 省份
     */
    @ExcelProperty(value = "省份")
    @FieldDispose(value = "province")
        private String province;
    /**
     * 市code
     */
    @ExcelProperty(value = "市code")
    @FieldDispose(value = "cityCode")
        private String cityCode;
    /**
     * 市
     */
    @ExcelProperty(value = "市")
    @FieldDispose(value = "city")
        private String city;
    /**
     * 报名开始时间
     */
    @ExcelProperty(value = "报名开始时间")
    @FieldDispose(value = "joinStartTime")
        private Date joinStartTime;
    /**
     * 报名结束时间
     */
    @ExcelProperty(value = "报名结束时间")
    @FieldDispose(value = "joinEndTime")
        private Date joinEndTime;
    /**
     * 培训开始时间
     */
    @ExcelProperty(value = "培训开始时间")
    @FieldDispose(value = "startTime")
        private Date startTime;
    /**
     * 培训结束时间
     */
    @ExcelProperty(value = "培训结束时间")
    @FieldDispose(value = "endTime")
        private Date endTime;
    /**
     * 培训地址
     */
    @ExcelProperty(value = "培训地址")
    @FieldDispose(value = "address")
        private String address;
    /**
     * 单间价格/人
     */
    @ExcelProperty(value = "单间价格/人")
    @FieldDispose(value = "singleRoomPrice")
        private BigDecimal singleRoomPrice;
    /**
     * 标间价格/人
     */
    @ExcelProperty(value = "标间价格/人")
    @FieldDispose(value = "standardRoomPrice")
        private BigDecimal standardRoomPrice;
    /**
     * 培训状态（未开始 报名中 报名结束 待开始 进行中 已完成）
     */
    @ExcelProperty(value = "培训状态（未开始 报名中 报名结束 待开始 进行中 已完成）")
    @FieldDispose(value = "status")
        private String status;
    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    @ExcelIgnore
    private String createBy;
    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @ExcelIgnore
    private Date createTime;
    /**
     * 修改人
     */
    @TableField(fill = FieldFill.UPDATE)
    @ExcelIgnore
    private String updateBy;
    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.UPDATE)
    @ExcelIgnore
    private Date updateTime;
    /**
     * 排序字段
     */
    @TableField(fill = FieldFill.INSERT)
    @ExcelIgnore
    private Long sort;

    @TableField(exist = false)
    private List<TrainProjectEntity> projects;
    }